<template>
  <!--建档资料维护模块 首期保费转账成功账户页面-->
  <div class="baseInfoPage">
    <div class="title">
      <span>账户信息</span>
    </div>
    <!-- 表单   -->
    <el-form label-width="130px" class="search_container" v-if="showFlag">
      <el-row>
        <el-col :span="6">
          <el-form-item label="账户持有人" prop="clntName">
            <el-input disabled v-model="zbxt.clntName" placeholder=""></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="银行名称" prop="bankdesc">
            <el-input disabled v-model="zbxt.bankdesc" placeholder=""></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="账户卡号" prop="bnkackey">
            <el-input disabled v-model="zbxt.bnkackey" placeholder=""></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <el-form label-width="130px" class="search_container" v-if="!showFlag">
      <el-row>
        <el-col :span="6">
          <el-form-item label="账户持有人" prop="clntName">
            <el-input disabled v-model="zbxu.clntName" placeholder=""></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="银行名称" prop="bankdesc">
            <el-input disabled v-model="zbxu.bankdesc" placeholder=""></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="账户卡号" prop="bnkackey">
            <el-input disabled v-model="zbxu.bankacckey" placeholder=""></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import constant from '@/utils/constant';

export default {
  data() {
    return {
      value: '',
      zbxt: {},
      zbxu: {},
      insureDataForm: this.insureData,
      showFlag: true
    }
  },
  props: {
    insureData: {
      type: Object
    }
  },
  mounted() {
    this.reloadInsureData(null);
  },
  methods: {
    reloadInsureData(insureData) {
      if (insureData != null) {
        this.insureDataForm = insureData;
      }
      this.zbxt = this.insureDataForm.zbxt;
      this.zbxu = this.insureDataForm.zbxu;
      if (this.zbxt && this.zbxt.clntName && this.zbxt.bankdesc && this.zbxt.bnkackey) {
        this.showFlag = true;
      } else if (this.zbxu && this.zbxu.clntName && this.zbxu.bankdesc && this.zbxu.bankacckey) {
        this.showFlag = false;
      }
    },
    getInsureData(insureData) {
      return this.insureDataForm;
    }
  },
  watch: {}
}
</script>
<style lang="less" scoped>
</style>